﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Slja.Utility;
using FrameWork.BasePage;
using System.Web.UI.HtmlControls;
namespace FrameWork.web.Web
{
    public partial class Test : SljaBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            btnSave.Click += new EventHandler(btnSave_Click);
            //Btn stat = Btn.Submit | Btn.SendMail;
            //lbResult.Text = stat.ToCusDescription();

            HtmlGenericControl script = new HtmlGenericControl("script");
            script.Attributes["src"] = "/js/offen/CheckRefresh.js";
            script.Attributes["type"] = "text/javascript";
            Page.Header.Controls.Add(script);
            if (IsPostBack)
            {
                if ((bool)HttpContext.Current.Items["IsRefresh"])
                {
                    Response.Write("refreshed");
                }
                else
                {
                    Response.Write("Postback");
                }
            }
            else
            {
                Response.Write("First Load");
            }
        }

        void btnSave_Click(object sender, EventArgs e)
        {
            lbCount.Text = (int.Parse(lbCount.Text) + 1).ToString();
            ScriptManager.RegisterStartupScript(Page, typeof(Page), "scriptkey", "alert("+lbCount.Text+");", true);
        }
    }
}